﻿@inject IStringLocalizer<BootstrapBlazor.Shared.Samples.Markdowns> Localizer

<Markdown @ref="Markdown"></Markdown>
<div class="mt-3">
    <Button OnClickWithoutRender="@(async () => await Markdown.DoMethodAsync("insertText", "# test"))">@Localizer["MarkdownsBrowserButtonText1"]</Button>
    <Button OnClickWithoutRender="@(async () => await Markdown.DoMethodAsync("insertText", $"![{Localizer["MarkdownsBrowserText"]}](https://i.niupic.com/images/2022/04/01/9Y6T.jpg)"))">@Localizer["MarkdownsBrowserButtonText2"]</Button>
    <Button OnClickWithoutRender="@(async () => await Markdown.DoMethodAsync("moveCursorToEnd"))">@Localizer["MarkdownsBrowserButtonText3"]</Button>
</div>

@code {
    [NotNull]
    private Markdown? Markdown { get; set; }
}
